home *** CD-ROM | disk | FTP | other *** search
/ All for Cell Phones: Sony Ericsson / Sony-Ericsson 2004.iso / Java / FallingBlocks / Blocks.jar / BlocksHelp.class (.txt) < prev   
Encoding:
Java Class File  |  2002-03-20  |  1.5 KB  |  39 lines

  1. import java.io.IOException;
  2. import javax.microedition.lcdui.Canvas;
  3. import javax.microedition.lcdui.Font;
  4. import javax.microedition.lcdui.Graphics;
  5. import javax.microedition.lcdui.Image;
  6.  
  7. public class BlocksHelp extends Canvas {
  8.    private Blocks parent;
  9.    Image buf;
  10.    Image imgLogo;
  11.    // $FF: renamed from: bg javax.microedition.lcdui.Graphics
  12.    Graphics field_0;
  13.    Font fcal;
  14.    private int width = ((Canvas)this).getWidth();
  15.    private int height = ((Canvas)this).getHeight();
  16.  
  17.    public BlocksHelp(Blocks creator) {
  18.       this.parent = creator;
  19.       this.buf = Image.createImage(this.width, this.height);
  20.       this.field_0 = this.buf.getGraphics();
  21.       this.field_0.setGrayScale(255);
  22.       this.field_0.fillRect(0, 0, ((Canvas)this).getWidth(), ((Canvas)this).getHeight());
  23.  
  24.       try {
  25.          if (((Canvas)this).getWidth() < 120) {
  26.             this.imgLogo = Image.createImage("/pics/fb11_1.png");
  27.          } else {
  28.             this.imgLogo = Image.createImage("/pics/fb11_2.png");
  29.          }
  30.       } catch (IOException var3) {
  31.       }
  32.  
  33.    }
  34.  
  35.    public void paint(Graphics g) {
  36.       g.drawImage(this.imgLogo, ((Canvas)this).getWidth() / 2, ((Canvas)this).getHeight() / 2, 1 | 2);
  37.    }
  38. }
  39.